﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 投诉建议表基础输入参数
/// </summary>
public class AppComplaintSuggestionBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 投诉类型
    /// </summary>
    [Dict(nameof(ComplaintTypeEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "投诉类型不能为空")]
    public virtual ComplaintTypeEnum? ComplaintType { get; set; }
    
    /// <summary>
    /// 问题描述
    /// </summary>
    [Required(ErrorMessage = "问题描述不能为空")]
    public virtual string Description { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>
    [Required(ErrorMessage = "联系方式不能为空")]
    public virtual string ContactInfo { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [Dict(nameof(ComplaintStatusEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "状态不能为空")]
    public virtual ComplaintStatusEnum? Status { get; set; }
    
    /// <summary>
    /// 处理结果
    /// </summary>
    public virtual string? ProcessResult { get; set; }
    
}

/// <summary>
/// 投诉建议表分页查询输入参数
/// </summary>
public class PageAppComplaintSuggestionInput : BasePageInput
{
    /// <summary>
    /// 投诉类型
    /// </summary>
    [Dict(nameof(ComplaintTypeEnum), AllowNullValue=true)]
    public ComplaintTypeEnum? ComplaintType { get; set; }
    
    /// <summary>
    /// 问题描述
    /// </summary>
    public string Description { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>
    public string ContactInfo { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [Dict(nameof(ComplaintStatusEnum), AllowNullValue=true)]
    public ComplaintStatusEnum? Status { get; set; }
    
    /// <summary>
    /// 处理结果
    /// </summary>
    public string? ProcessResult { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 投诉建议表增加输入参数
/// </summary>
public class AddAppComplaintSuggestionInput
{
    /// <summary>
    /// 投诉类型
    /// </summary>
    [Dict(nameof(ComplaintTypeEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "投诉类型不能为空")]
    public ComplaintTypeEnum? ComplaintType { get; set; }
    
    /// <summary>
    /// 问题描述
    /// </summary>
    [Required(ErrorMessage = "问题描述不能为空")]
    public string Description { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>
    [Required(ErrorMessage = "联系方式不能为空")]
    [MaxLength(50, ErrorMessage = "联系方式字符长度不能超过50")]
    public string ContactInfo { get; set; }

    /// <summary>
    /// 状态
    /// </summary>
    public ComplaintStatusEnum? Status { get; set; } = ComplaintStatusEnum.Pending;

    /// <summary>
    /// 处理结果
    /// </summary>
    public string? ProcessResult { get; set; }
    
}

/// <summary>
/// 投诉建议表删除输入参数
/// </summary>
public class DeleteAppComplaintSuggestionInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 投诉建议表更新输入参数
/// </summary>
public class UpdateAppComplaintSuggestionInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 投诉类型
    /// </summary>    
    [Dict(nameof(ComplaintTypeEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "投诉类型不能为空")]
    public ComplaintTypeEnum? ComplaintType { get; set; }
    
    /// <summary>
    /// 问题描述
    /// </summary>    
    [Required(ErrorMessage = "问题描述不能为空")]
    public string Description { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>    
    [Required(ErrorMessage = "联系方式不能为空")]
    [MaxLength(50, ErrorMessage = "联系方式字符长度不能超过50")]
    public string ContactInfo { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>    
    [Dict(nameof(ComplaintStatusEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "状态不能为空")]
    public ComplaintStatusEnum? Status { get; set; }
    
    /// <summary>
    /// 处理结果
    /// </summary>    
    public string? ProcessResult { get; set; }
    
}

/// <summary>
/// 投诉建议表主键查询输入参数
/// </summary>
public class QueryByIdAppComplaintSuggestionInput : DeleteAppComplaintSuggestionInput
{
}

/// <summary>
/// 投诉建议表数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportAppComplaintSuggestionInput : BaseImportInput
{
    /// <summary>
    /// 投诉类型
    /// </summary>
    [ImporterHeader(Name = "*投诉类型")]
    [ExporterHeader("*投诉类型", Format = "", Width = 25, IsBold = true)]
    public ComplaintTypeEnum? ComplaintType { get; set; }
    
    /// <summary>
    /// 问题描述
    /// </summary>
    [ImporterHeader(Name = "*问题描述")]
    [ExporterHeader("*问题描述", Format = "", Width = 25, IsBold = true)]
    public string Description { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>
    [ImporterHeader(Name = "*联系方式")]
    [ExporterHeader("*联系方式", Format = "", Width = 25, IsBold = true)]
    public string ContactInfo { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [ImporterHeader(Name = "*状态")]
    [ExporterHeader("*状态", Format = "", Width = 25, IsBold = true)]
    public ComplaintStatusEnum? Status { get; set; }
    
    /// <summary>
    /// 处理结果
    /// </summary>
    [ImporterHeader(Name = "处理结果")]
    [ExporterHeader("处理结果", Format = "", Width = 25, IsBold = true)]
    public string? ProcessResult { get; set; }
    
}
